<!DOCTYPE html>
<html><!--HTML5 doctype-->

<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Pragma" content="no-cache">
<script type="text/javascript" charset="utf-8" src="intelxdk.js"></script>
<script type="text/javascript" language="javascript">
    var isIntel=window.intel&&window.intel.xdk
    // This event handler is fired once the intel libraries are ready
    function onDeviceReady() {
        //hide splash screen now that our app is ready to run
        intel.xdk.device.hideSplashScreen();
        setTimeout(function () {    
            $.ui.launch();
        }, 50);
    }
    //initial event handler to detect when intel is ready to roll
    document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);
    //var BASE_URL='http://192.168.10.14/wnsgbl-repo/mobileapp/';
    var BASE_URL='https://www.winsglobal.com/mobileapp/';
</script>
<!--<style class="noload" data-s="js/appframework.ui.min.js"></style>-->
<script src="js/jquery.min.js"></script>
<script src="js/af.ui.jquery.min.js"></script>
<script src="js/ap.slidemenu.js"></script>
<script src="intelxdk.js"></script>
<script src="xhr.js"></script>
<script>
    if(isIntel)
        $.ui.autoLaunch = false;
    $.ui.useOSThemes = false; //Change this to false to force a device theme
    $.ui.blockPageScroll();
    $(document).ready(function () {
        if ($.ui.useOSThemes && (!$.os.ios||$.os.ios7))
            $("#afui").removeClass("ios");
    });
</script>
<script>
    $.ui.autoLaunch = false;
    $.ui.animateHeaders = false;
    
    function getPartners()	{
        var list_corp_html = '<li><a href="#corpFreedom">Freedom Stars</a></li>';
        var panel_freedom = '<h2>Freedom Stars</h2><div class="photo"><img src="images/freedom.jpg" style="width: 100%; height: auto;"/></div><p>Giving you the FREEDOM to connect with the STARS</p>';
        $.ui.addContentDiv('corpFreedom', panel_freedom, "Partner Info"); 
        
        list_corp_html += '<li><a href="#corpCatfiz">Catfiz</a></li>';
        var panel_catfiz = '<h2>Catfiz</h2><div class="photo"><img src="images/catfiz.png" style="width: 100%; height: auto;"/>';
        $.ui.addContentDiv('corpCatfiz', panel_catfiz, "Partner Info");
        
        list_corp_html += '<li><a href="#corpSprint">Sprint</a></li>';
        var panel_sprint = '<h2>Sprint</h2><div class="photo"><img src="images/sprint.jpg" style="width: 100%; height: auto;"/>';
        $.ui.addContentDiv('corpSprint', panel_sprint, "Partner Info");
        
        list_corp_html += '<li><a href="#corpStarssip">StarSSip</a></li>';
        var panel_starssip = '<h2>StarSSip</h2><div class="photo"><img src="images/starssip.png" style="width: 100%; height: auto;"/>';
        $.ui.addContentDiv('corpStarssip', panel_starssip, "Partner Info");
        
        $("#corporateList").append(list_corp_html);
        $.ajax({
            type:"GET",
            url:BASE_URL+"get_partners",
            //data:{'foo':'bar'},
            success:function(data){
                var list_html = "";
                var db_list_corp_html = "";
                for(var i=0; i< data.length; i++){
                    var id = data[i].merID;
                    var name = data[i].mrc_name;
                    var img = data[i].logo;
                    var descript = data[i].descript;
                    var offers = data[i].offers;
                    var email = data[i].email;
                    var address = data[i].address;
                    var phone1 = data[i].phone1;
                    var phone2 = data[i].phone2;
                    var fax = data[i].fax;
            
                    list_html += '<li><a href="#merc'+id+'">'+ name +'</a></li>';
            
                    /* Dynamically add panel */
                    var panel_content = '<h2>'+name+'</h2><div class="photo"><img src="'+img+'" style="width: 100%; height: auto;"/></div><p>'+descript+'</p><p>Offers: '+offers+'</p><p>Email: '+email+'</p><p>Address: '+address+'</p><p>Phone 1: '+phone1+'</p><p>Phone 2: '+phone2+'</p><p>Fax: '+fax+'</p>';
                    $.ui.addContentDiv('merc'+id, panel_content, "Partner Info"); 
                    if (id === '5a3b968fc2d2e07fe27c' || id === '49d896c106133acadd27' || id === '618b0f93c01276b2565d') {
                        db_list_corp_html += '<li><a href="#corp'+id+'">'+ name +'</a></li>';
                        //alert(list_corp_html);
                        $.ui.addContentDiv('corp'+id, panel_content, "Partner Info"); 
                    }
                }
                $("#merchantList").append(list_html);
                $("#corporateList").append(db_list_corp_html);
            },
            error: function (xhr, ajaxOptions, thrownError) {
                alert(xhr.status);
                alert(thrownError);
            }
        });
    }
    
    function getMerchants()	{
        $.ajax({
            type:"GET",
            url:BASE_URL+"get_merchants",
            //data:{'foo':'bar'},
            success:function(data){
                var list_html = "";
                for(var i=0; i< data.length; i++){
                    var id = data[i].mrcID;
                    var name = data[i].mrc_brandName;
                    var img = data[i].mrc_logo;
                    var descript = data[i].mrc_hour;
                    var email = data[i].mrc_email;
                    var website = data[i].mrc_website;
                    var social = data[i].mrc_social_media;
            
                    list_html += '<li><a href="#'+id+'">'+ name +'</a></li>';
            
                    /* Dynamically add panel */
                    var panel_content = '<h2>'+name+'</h2><div class="photo"><img src="'+img+'" style="width: 100%; height: auto;"/></div><p>'+descript+'</p><p>Email: '+email+'</p><p>Website: '+website+'</p><p>Social: '+social+'</p>';
                    $.ui.addContentDiv(id, panel_content, "Partner Info"); 
                }
                $("#productList").append(list_html);
            },
            error: function (xhr, ajaxOptions, thrownError) {
                alert(xhr.status);
                alert(thrownError);
            }
        });
    }

    $(document).ready(function(){
        $.ui.setSideMenuWidth('260px');
        $.ui.launch();
        $.ui.removeFooterMenu();
        getPartners();
        getMerchants();
    });
</script>
<link href="css/icons.css" rel="stylesheet" type="text/css">
<link href="css/af.ui.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="afui" class="ios7">
    <!--Left Side Menu Navigation bar -->
    <nav id="nav_0">
        <ul class="list">
            <li><a href="#page1" class="icon home">Home</a>
            </li>
            <li><a href="#page2" class="icon paper">Banking</a>
            </li>
            <li><a href="#page3" class="icon user">Corporate</a>
            </li>
            <li><a href="#page4" class="icon stack">Merchant</a>
            </li>
            <li><a href="#page5" class="icon folder">Product</a>
            </li>
        </ul>
    </nav>

    <div id="header" class="header"></div>
    <div id="content" style="">

        <!--Main View Pages-->
        <div class="panel" title="Home" id="page1" data-footer="none" selected="true" style=""
        data-appbuilder-object="page">
            <header style="" data-appbuilder-object="header" class="">
                <a id="menubadge" onclick="$.ui.toggleSideMenu()" class="menuButton" style="float:left !important"></a>
                <h1>Home</h1>
            </header>
            <div class="container" style="width: 100%; height: 100%;" data-appbuilder-object="container">

                <div class="text_item" data-appbuilder-object="text" style="text-align: center;">
                    <h2>WINS Global Partnership</h2>
                </div>
                <img src="images/homeblock-partnership.jpg" style="width: 100%; height: auto;"
                alt="Title" data-appbuilder-object="image" class="" title="">
                <div class="text_item" data-appbuilder-object="text" style="text-align: center;">
                    <p>Banks, Co-Branded Cards Enterprise Partners, Telecoms, Merchants</p>
                    <p>The Possibilities Are Limitless</p>
                    <p>Please visit our website at winsglobal.com</p>
                </div>
            </div>
        </div>

        <div class="panel" title="Banking" id="page2" style="" data-appbuilder-object="page"
        data-nav="nav_0" data-footer="none">
            <header style="" data-appbuilder-object="header" class="">
                <a id="menubadge" onclick="$.ui.toggleSideMenu()" class="menuButton" style="float:left !important"></a>
                <h1>Banking</h1>
            </header>
            <div class="container" style="width: 100%; height: 100%;" data-appbuilder-object="container">

                <div class="text_item" data-appbuilder-object="text" style="text-align: center;">
                    <h2>Bank Central Asia</h2>
                </div>
                <img src="images/bca.jpg" style="width: 100%; height: auto;" alt="Title" data-appbuilder-object="image"
                class="" title="">
            </div>
        </div>

        <div class="panel" title="Corporate" id="page3" style="" data-appbuilder-object="page"
        data-nav="nav_0" data-footer="none">
            <header style="" data-appbuilder-object="header" class="">
                <a id="menubadge" onclick="$.ui.toggleSideMenu()" class="menuButton" style="float:left !important"></a>
                <h1>Corporate</h1>
            </header>
            <ul class="list" id="corporateList" data-appbuilder-object="list">
            </ul>
        </div>

        <div class="panel" title="Merchant" id="page4" style="" data-appbuilder-object="page"
        data-nav="nav_0" data-footer="none">
            <header style="" data-appbuilder-object="header" class="">
                <a id="menubadge" onclick="$.ui.toggleSideMenu()" class="menuButton" style="float:left !important"></a>
                <h1>Merchant</h1>
            </header>
            <ul class="list" id="merchantList" data-appbuilder-object="list">
            </ul>
        </div>

        <div class="panel" title="Product" id="page5" style="" data-appbuilder-object="page"
        data-nav="nav_0" data-footer="none">
            <header style="" data-appbuilder-object="header" class="">
                <a id="menubadge" onclick="$.ui.toggleSideMenu()" class="menuButton" style="float:left !important"></a>
                <h1>Product</h1>
            </header>
            <ul class="list" id="productList" data-appbuilder-object="list">
            </ul>
        </div>
    </div>
    <div id="navbar" class="footer"> <a class="icon home">Home</a>
    </div>
    <footer id="footer_2" data-appbuilder-object="footer"></footer>
</div>
</body>





</html>